<template>
  <div class="star">
    <ProfileTopNav title="我的收藏" />
    <van-list
      :immediate-check="false"
      :v-model="false"
      :finished="true"
      finished-text="没有更多了"
    >
      <PostItem :article="item" v-for="item in postList" :key="item.id" />
    </van-list>
    <Return father=".star" paths="/user" />
  </div>
</template>

<script>
import ProfileTopNav from "@/components/TopNav";
import PostItem from "@/components/PostItem";
import Return from "@/components/Return";
export default {
  components: {
    ProfileTopNav,
    PostItem,
    Return,
  },
  data() {
    return {
      postList: [],
    };
  },
  created() {
    this.loadPost();
  },
  methods: {
    loadPost() {
      this.$axios({
        url: "/user_star",
      }).then((res) => {
        this.postList = res.data.data;
        console.log(res.data.data);
        console.log(this.postList);
      });
    },
  },
};
</script>

<style>
</style>